﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DistributedSystems.Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function comparetime() { 
            
        }
    </script>
    <title>Distri</title>
</head>
<body>
    <div class="divPanel">
    </div>
    <div class="divMain">
        <div class="divOrderTitle">
            Delivery Form</div>
        <form id="main" runat="server" class="divOrder">
        <asp:ScriptManager ID="asm" runat="server" />
        <div class="divRow">
            <div class="divLeft">
                User name:</div>
            <div class="divRight">
                <asp:TextBox ID="txtUserNameInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVUserNameInput" runat="server" ErrorMessage="User name can't blank."
                CssClass="divAlert" ControlToValidate="txtUserNameInput">*</asp:RequiredFieldValidator>
            </div>            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Origin Address:</div>
            <div class="divRight">
                <asp:TextBox ID="txtOriginAddressInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVOriginAddressInput" runat="server" ErrorMessage="The Origin Address can't blank"
                CssClass="divAlert" ControlToValidate="txtOriginAddressInput">*</asp:RequiredFieldValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Post Code Origin:</div>
            <div class="divRight">
                <asp:TextBox ID="txtPostCodeOrigin" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="User name can't blank."
                CssClass="divAlert" ControlToValidate="txtUserNameInput">*</asp:RequiredFieldValidator>
                <asp:CustomValidator ID="CVPostCodeOri" runat="server" CssClass="divAlert" 
                    ErrorMessage="Check post code and origin address" 
                    onservervalidate="CustomValidator1_ServerValidate" >*</asp:CustomValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Destination Address:</div>
            <div class="divRight">
                <asp:TextBox ID="txtDestinationAddressInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVDestinationAddress" runat="server" ErrorMessage="Destination address can't blank"
                CssClass="divAlert" ControlToValidate="txtDestinationAddressInput">*</asp:RequiredFieldValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Post Code Destination:</div>
            <div class="divRight">
                <asp:TextBox ID="txtPostCodeInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVPostCodeAlert" runat="server" ErrorMessage="Post code is not blank"
                CssClass="divAlert" ControlToValidate="txtPostCodeInput">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidator1" runat="server" 
                    ControlToCompare="txtPostCodeOrigin" ControlToValidate="txtPostCodeInput" 
                    CssClass="divAlert" 
                    ErrorMessage="Post Code Origin Different post code destination" 
                    Operator="NotEqual">*</asp:CompareValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Phone Number:</div>
            <div class="divRight">
                <asp:TextBox ID="txtPhoneNumberInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVPhoneNumber" runat="server" ErrorMessage="Phone number can't blank"
                CssClass="divAlert" ControlToValidate="txtPhoneNumberInput">*</asp:RequiredFieldValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Number of Trunks:</div>
            <div class="divRight">
                <asp:TextBox ID="txtNumTrunksInput" CssClass="divInput" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVNumTrunk" runat="server" ErrorMessage="Number of trunks is not blank"
                CssClass="divAlert" ControlToValidate="txtNumTrunksInput">*</asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RVNumberOfTrunks" runat="server" 
                    ControlToValidate="txtNumTrunksInput" CssClass="divAlert" 
                    ErrorMessage="Min Number of trunks is 1" MaximumValue="10000" 
                    MinimumValue="1" Type="Integer">*</asp:RangeValidator>
            </div>
            
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divLeft">
                Start delivery</div>
            <div class="divCenter">
                <MKB:TimeSelector ID="tsStartDilivery" runat="server" 
                    SelectedTimeFormat="TwentyFour">
                </MKB:TimeSelector>
                <asp:TextBox ID="tbNgayDi" runat="server" Height="22px" Width="190px" CssClass="fright"></asp:TextBox>
                <asp:Panel ID="pnNgayDi" runat="server" Width="255px">
                    <asp:UpdatePanel ID="up1" runat="server">
                        <ContentTemplate>
                            <asp:Calendar ID="c1" runat="server" Format="dd/MM/yyyy" BackColor="#CCFFCC" OnDayRender="Calendar_DayRender"
                                OnSelectionChanged="c1_SelectionChanged" />
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </asp:Panel>
                <cc1:PopupControlExtender ID="pce1" runat="server" TargetControlID="tbNgayDi" PopupControlID="pnNgayDi"
                    Position="Bottom" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ErrorMessage="Start Delivery can't blank" ControlToValidate="tbNgayDi" 
                    CssClass="divAlert">*</asp:RequiredFieldValidator>
            </div>
        </div>
        <div class="divNull">
        </div>
        <div class="divRow">
            <div class="divCenter">
            </div>
        </div>
        <div class="divNull">
        </div>
        <div>
            <asp:Button ID="btnSubmit" CssClass="divButton" runat="server" Text="Submit" 
                OnClick="btnSubmit_Click" PostBackUrl="~/Result.aspx" />
        </div>
        <div>
            <asp:ValidationSummary ID="VSSUM" runat="server" />
        </div>
        </form>
    </div>
    <div class="divFooter">
    </div>
</body>
</html>
